<!DOCTYPE html>
<html lang="cn">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>

</html>
<script>
    let liSi = {
        'user-name': '詹姆斯',
        age: 18,
        address: '洛杉矶',
        sayHi(yourName) {
            document.write("Hi~~~" + yourName);
        }
    }

    document.write(liSi.age);
    document.write(liSi['user-name']);
    document.write(liSi['address']);


    liSi.sayHi("张三");
    liSi.sing = function() {
        document.write("唱歌");
    }
    liSi.sing();
    liSi.dance = function(x, y) {
        document.write("跳舞" + x + y);
    }
    liSi.dance(1, 9);

    for (k in liSi) {
        document.write(k);
        document.write(liSi[k]);
    }
</script>